package com.iris.live.services.data.models;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * Created by ThinkPad on 2016/11/9.
 */
@Entity
@Table(name = "报价精品详细表", schema = "live", catalog = "")
@IdClass(报价精品详细表ModelPK.class)
public class 报价精品详细表Model {
    private Integer 编号;
    private Integer id;
    private String 名称;
    private Integer 数量;
    private BigDecimal 原价;
    private BigDecimal 折后价;
    private String sc备注;
    private String 备注;
    private String 是否赠品;
    private String 是否补充;
    private String 更新账号;
    private Timestamp 更新时间;
    private BigDecimal 成本;
    private String originType;  // 精品来源类型;1-第三方精品;2-自定义精品
    private String originShopId; // 第三方精品编码
    private String originShopUnit;  // 第三方精品单位

    @Id
    @Column(name = "编号")
    public Integer get编号() {
        return 编号;
    }

    public void set编号(Integer 编号) {
        this.编号 = 编号;
    }

    @Id
    @Column(name = "ID")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "名称")
    public String get名称() {
        return 名称;
    }

    public void set名称(String 名称) {
        this.名称 = 名称;
    }

    @Basic
    @Column(name = "数量")
    public Integer get数量() {
        return 数量;
    }

    public void set数量(Integer 数量) {
        this.数量 = 数量;
    }

    @Basic
    @Column(name = "原价")
    public BigDecimal get原价() {
        return 原价;
    }

    public void set原价(BigDecimal 原价) {
        this.原价 = 原价;
    }

    @Basic
    @Column(name = "折后价")
    public BigDecimal get折后价() {
        return 折后价;
    }

    public void set折后价(BigDecimal 折后价) {
        this.折后价 = 折后价;
    }

    @Basic
    @Column(name = "SC备注")
    public String getSc备注() {
        return sc备注;
    }

    public void setSc备注(String sc备注) {
        this.sc备注 = sc备注;
    }

    @Basic
    @Column(name = "备注")
    public String get备注() {
        return 备注;
    }

    public void set备注(String 备注) {
        this.备注 = 备注;
    }

    @Basic
    @Column(name = "是否赠品")
    public String get是否赠品() {
        return 是否赠品;
    }

    public void set是否赠品(String 是否赠品) {
        this.是否赠品 = 是否赠品;
    }

    @Basic
    @Column(name = "是否补充")
    public String get是否补充() {
        return 是否补充;
    }

    public void set是否补充(String 是否补充) {
        this.是否补充 = 是否补充;
    }

    @Basic
    @Column(name = "更新账号")
    public String get更新账号() {
        return 更新账号;
    }

    public void set更新账号(String 更新账号) {
        this.更新账号 = 更新账号;
    }

    @Basic
    @Column(name = "更新时间")
    public Timestamp get更新时间() {
        return 更新时间;
    }

    public void set更新时间(Timestamp 更新时间) {
        this.更新时间 = 更新时间;
    }

    @Basic
    @Column(name = "成本")
    public BigDecimal get成本() {
        return 成本;
    }

    public void set成本(BigDecimal 成本) {
        this.成本 = 成本;
    }

    @Basic
    @Column(name = "origin_type")
    public String getOriginType() {
        return originType;
    }

    public void setOriginType(String originType) {
        this.originType = originType;
    }

    @Basic
    @Column(name = "origin_shop_id")
    public String getOriginShopId() {
        return originShopId;
    }

    public void setOriginShopId(String originShopId) {
        this.originShopId = originShopId;
    }

    @Basic
    @Column(name = "origin_shop_unit")
    public String getOriginShopUnit() {
        return originShopUnit;
    }

    public void setOriginShopUnit(String originShopUnit) {
        this.originShopUnit = originShopUnit;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        报价精品详细表Model that = (报价精品详细表Model) o;

        if (编号 != null ? !编号.equals(that.编号) : that.编号 != null) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (名称 != null ? !名称.equals(that.名称) : that.名称 != null) return false;
        if (数量 != null ? !数量.equals(that.数量) : that.数量 != null) return false;
        if (原价 != null ? !原价.equals(that.原价) : that.原价 != null) return false;
        if (折后价 != null ? !折后价.equals(that.折后价) : that.折后价 != null) return false;
        if (sc备注 != null ? !sc备注.equals(that.sc备注) : that.sc备注 != null) return false;
        if (备注 != null ? !备注.equals(that.备注) : that.备注 != null) return false;
        if (是否赠品 != null ? !是否赠品.equals(that.是否赠品) : that.是否赠品 != null) return false;
        if (是否补充 != null ? !是否补充.equals(that.是否补充) : that.是否补充 != null) return false;
        if (更新账号 != null ? !更新账号.equals(that.更新账号) : that.更新账号 != null) return false;
        if (更新时间 != null ? !更新时间.equals(that.更新时间) : that.更新时间 != null) return false;
        if (成本 != null ? !成本.equals(that.成本) : that.成本 != null) return false;
        if (originType != null ? !originType.equals(that.originType) : that.originType != null) return false;
        if (originShopId != null ? !originShopId.equals(that.originShopId) : that.originShopId != null) return false;
        if (originShopUnit != null ? !originShopUnit.equals(that.originShopUnit) : that.originShopUnit != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = 编号 != null ? 编号.hashCode() : 0;
        result = 31 * result + (id != null ? id.hashCode() : 0);
        result = 31 * result + (名称 != null ? 名称.hashCode() : 0);
        result = 31 * result + (数量 != null ? 数量.hashCode() : 0);
        result = 31 * result + (原价 != null ? 原价.hashCode() : 0);
        result = 31 * result + (折后价 != null ? 折后价.hashCode() : 0);
        result = 31 * result + (sc备注 != null ? sc备注.hashCode() : 0);
        result = 31 * result + (备注 != null ? 备注.hashCode() : 0);
        result = 31 * result + (是否赠品 != null ? 是否赠品.hashCode() : 0);
        result = 31 * result + (是否补充 != null ? 是否补充.hashCode() : 0);
        result = 31 * result + (更新账号 != null ? 更新账号.hashCode() : 0);
        result = 31 * result + (更新时间 != null ? 更新时间.hashCode() : 0);
        result = 31 * result + (成本 != null ? 成本.hashCode() : 0);
        result = 31 * result + (originType != null ? originType.hashCode() : 0);
        result = 31 * result + (originShopId != null ? originShopId.hashCode() : 0);
        result = 31 * result + (originShopUnit != null ? originShopUnit.hashCode() : 0);
        return result;
    }
}
